import pandas as pd


class AccountInfo:
    def __init__(self, id, display_id, open_id, access_token, user_id):
        self.id = id
        self.display_id = display_id
        self.open_id = open_id
        self.access_token = access_token
        self.user_id = user_id


def get_accounts() -> object:
    """

    :rtype: object
    """
    file_path = "/Users/libin/account.xlsx"
    # 读取Excel文件
    df = pd.read_excel(file_path, sheet_name=0, skiprows=0)

    # 将DataFrame转换为AccountInfo对象列表
    accounts = []
    for index, row in df.iterrows():
        account = AccountInfo(
            id=row['id'],
            display_id=row['display_id'],
            open_id=row['open_id'],
            access_token=row['access_token'],
            user_id=row['user_id']
        )
        accounts.append(account)

    return accounts